<template>
	<view class="system-safe">
		<view class="box" @click="go">
			<h3>{{$t('mine.systen.idSafe')}}</h3>
			<image src="../../static/get/go.png" mode=""></image>
		</view>
		<u-modal :show="show" title="尚未登录，是否去登录？" showCancelButton :closeOnClickOverlay="true" @close="show = false" @cancel="show = false" @confirm="jumpLogin"></u-modal>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false
			};
		},
		methods:{
			jumpLogin() {
				uni.navigateTo({
					url: '/pages/login/login'
				})
				this.show = false
			},
			go(){
				if(this.$store.state.istoken) {
					uni.navigateTo({
						url:'/pages/idsafeChange/idsafeChange'
					})
				} else {
					this.show = true
				}
			}
		}
	}
</script>

<style>
.box{
	width: 94%;
	height: 100rpx;
	background-color: #FFFFFF;
	margin: auto;
	box-shadow: 0 0 0 rgba(0,0,0,.06);
	display: flex;
	position: relative;
}
h3{
	line-height: 100rpx;
	margin-left: 40rpx;
	opacity: .8;
}
.box>image{
	width: 20rpx;
	height: 20rpx;
	position: absolute;
	right: 40rpx;
	top: 40rpx;
}
</style>
